#pragma once

#include "Waypoint.h"
#include "IComponent.h"
#include "Trigger.h"

class WaypointComponent : public IComponent
{
public:
	static const HashedString type;
	
	WaypointComponent( Entity* parent );
	virtual ~WaypointComponent();
	
	const HashedString& Type();
	std::string ToString() const;
	bool ToXML( tinyxml2::XMLPrinter& printer );
	
	float Radius();
	void Radius( float radius );
	void BindTo( Subject<Maths::Vector3D>& location );
	Pointer<Pathing::Waypoint>& Waypoint();
private:
	Pointer<Pathing::Waypoint> m_waypoint;
	Pointer<TriggerBase> m_location;
};